package com.xbongbong.paas.pojo.dto;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import com.xbongbong.pro.label.pojo.LabelPojo;
import com.xbongbong.pro.onlineEditor.TemplateFieldValuePojo;
import com.xbongbong.saas.domain.entity.PublicGroupSeniorEntity;
import com.xbongbong.sys.domain.entity.DepartmentEntity;
import com.xbongbong.sys.domain.entity.UserEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;
import java.util.Map;

/**
 * @author: wufeng
 * @date: 2018/12/17 18:59
 * @desrcption: 解析单行数据
 */
@Getter
@Setter
@ToString
public class ParseSingleRowDataDTO extends BaseDTO {
    private static final long serialVersionUID = -5661034998245241539L;

    /**
     * 为了排错，加下这个属性
     */
    private Long dataId;

    /**
     * 数据
     */
    private JSONObject dataJsonObject;
    
    /**
     * 是否从外链过来的，true是，false否
     */
    private Boolean outerLink = false;

    /**
     * 字段容器
     */
    private Map<String, FieldAttrEntity> explainMap;

    /**
     * 字段列表
     */
    private List<FieldAttrEntity> explainList;

    /**
     * 用户容器
     */
    private Map<String, UserEntity> userMap;

    /**
     * 部门容器
     */
    private Map<String, DepartmentEntity> departmentMap;
    /**
     * saas标记
     */
    private Integer saasMark;

    /**
     * 业务类型
     */
    private Integer businessType;

    /**
     * 导出为1
     */
    private Integer fromExport;

    /**
     * 创建者
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private String creatorId;
    /**
     * 负责人
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private List<String> ownerId;
    /**
     * 协同人
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private List<String> coUserId;

    private Boolean isProcess;
    /**
     * 列表调用
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer listFlag;
    /**
     * 详情调用
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer detailFlag;

    /**
     * formId
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Long formId;

    /**
     * 公海分组容器
     */
    private Map<Long, PublicGroupSeniorEntity> publicGroupMap;

    private Map<Long, LabelPojo> labelPojoMap;

    /**
     * 在线编辑
     */
    private Map<Object, TemplateFieldValuePojo> templateFieldMap;
}
